package com.like.fragment;


import android.content.Intent;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;

import com.like.adapter.DrugAdapter;
import com.like.hospitalworld.DrugDetailActivity;
import com.like.hospitalworld.R;
import com.like.likeutils.util.ListViewUtil;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.Event;
import org.xutils.view.annotation.ViewInject;

@ContentView(R.layout.fragment_drug_helper_adult)
public class DrugHelperAdultFragment extends BaseFragment {

    @ViewInject(R.id.drug_list)
    ListView mDrugList;

    private DrugAdapter mDrugAdapter;

    @Override
    protected void onCreateView() {
        super.onCreateView();
        mDrugAdapter = new DrugAdapter();
        mDrugList.setAdapter(mDrugAdapter);
    }

    @Event(value = R.id.drug_list, type = AdapterView.OnItemClickListener.class)
    private void drugListClick(AdapterView<?> parent, View view, int position, long id) {
        Intent intent = new Intent(m.mContext, DrugDetailActivity.class);
        startActivity(intent);
    }
}
